{% extends "manabe/template.html" %}
{% load staticfiles %}
{% block title %} 更改密码 {% endblock %}

{% block content %}
{% if not changepwd_success %}
<form class="form form-horizontal" action="" method="post">
    {% csrf_token %}
    <div class="row cl">
        <div class="formControls col-xs-8">
            {{ form.oldpassword }}
        </div>
    </div>

    <div class="row cl">
        <div class="formControls col-xs-8">
             {{ form.newpassword1 }}
        </div>
    </div>
    <div class="row cl">
        <div class="formControls col-xs-8">
             {{ form.newpassword2 }}
        </div>
    </div>
    <div class="row cl text-l">
        {% for item in error %}
            <p style="color:red;" class="text-l">{{item}}</p>
        {% endfor %}
        <div class="formControls">
            <input type="submit" class="btn btn-success radius size-L" value="更改密码" />
        </div>
    </div>
</form>
{% else %}
<div>密码更改成功，请用<a href="{% url 'logout' %}">重新登陆</a>！</div>
{% endif%}

{% endblock %}